<div style="position: absolute;top: 120px; left: 450px">
    <font style="font-size: 25px ;color: #e8198b">销售单出库：</font>&nbsp;&nbsp;

</div>


<br>
<table class="altrowstable">
    <tr>
        <td>编号</td>
        <td>销售单编号</td>
        <td>创建时间</td>
        <td>供应商名称</td>
        <td>创建用户</td>
        <td>附加费用</td>
        <td>采购产品总价</td>
        <td>采购单总价格</td>
        <td>付款方式</td>
        <td>处理状态</td>
        <td>明细</td>
        <td>出库</td>
    </tr>
    <tbody id="outStorageSoMainBody">

    </tbody>
    <div  style="position: absolute; margin-top: 0px;padding-left: 700px">
        <ul id="page">分页</ul>
    </div>
</table>


<script type="text/html" id="outStorageSoMainTemplate">
    {{each data}}
    <tr>
        <td>{{$index+1}}</td>
        <td>{{$value.soID}}</td>
        <td>{{$value.createTime}}</td>
        <td>{{$value.customerCode}}</td>
        <td>{{$value.account}}</td>
        <td>{{$value.tipFee}}</td>
        <td>{{$value.productTotal}}</td>
        <td>{{$value.poTotal}}</td>
        <td>{{$value.payType}}</td>
        <td>{{$value.status}}</td>
        <td><font style="color: #e8198b" onclick="{{'getSoItem(\''+ $value.soID +'\')'}}">查看明细</font></td>
        <td><span style="color: #84fab0" onclick="{{'outStorage(\''+$value.soID+'\')'}}">出库</span></td>
    {{/each}}
</script>
<script>

    laydate.render({
        elem: '#timeRange'
        //设置开始日期、日期日期的 input 选择器
        //数组格式为 5.3.0 开始新增，之前版本直接配置 true 或任意分割字符即可
        ,range: "~"
    });
    $(function () {
        showPage({
            currentPage: 1,
            pageSize: 3,
            url:'getStorageSoMain',
            templateId: 'outStorageSoMainTemplate',
            contentId: 'outStorageSoMainBody',
        })
    })

    function outStorage(soID) {
        var flag= window.confirm("确认出库");
        if (flag){
            Ajax.post("outStorage",{soID:soID},function (result) {
                alert(result.message);
                show('OutStorage.html');
            })
        }

    }
</script>